Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Bootstrap's collapse for wells. #857

Merged
merged 1 commit into from
Jul 16, 2017
Merged

Use Bootstrap's collapse for wells. #857

merged 1 commit into from
Jul 16, 2017

Conversation

XhmikosR
Copy link
Collaborator

No description provided.

@XhmikosR XhmikosR requested a review from jmervine July 14, 2017 20:04
@jmervine jmervine temporarily deployed to bootstrapcdn-dev-pr-857 July 14, 2017 20:04 Inactive
@XhmikosR
Copy link
Collaborator Author

It's not perfect since the toggle button action happens instantly and the collapse has a delay but it's better than before.

Any suggestions/patches welcome.

@XhmikosR
Copy link
Collaborator Author

/CC @Johann-S just in case you have time and any improvement ideas.

@Johann-S
Copy link
Contributor

Johann-S commented Jul 14, 2017

Maybe that's related to : twbs/bootstrap#20870 🤔
It seems padding add some strange effect

var btnIcon = el[index].querySelector('span');

el[index].addEventListener('click', function() {
document.getElementById(name).classList.toggle('hidden');
btnIcon.classList.toggle('caret-open');
Copy link
Contributor

@Johann-S Johann-S Jul 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can do to change the caret only when the collapse transition ended :

setTimeout(function () {
  btnIcon.classList.toggle('caret-open');
}, 350);

350 is the transition duration of the Collapse plugin (https://github.com/twbs/bootstrap/blob/v3-dev/js/collapse.js#L35)

@XhmikosR
Copy link
Collaborator Author

XhmikosR commented Jul 15, 2017 via email

@jmervine
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants